#ifndef NOSAL_EXEC_INTERNAL_CONFIG_STATE_DEPENDENT_STARTUP_CONFIG_H_
#define NOSAL_EXEC_INTERNAL_CONFIG_STATE_DEPENDENT_STARTUP_CONFIG_H_

#include "enter_exit_timeout.h"

#include "nosal/core/optional.h"

#include <string>
#include <vector>
#include <algorithm>
#include <cstdint>


namespace netaos {
namespace nosal {
namespace exec {
namespace internal {
namespace config {

struct FunctionalGroupState
{
    std::string name;
    std::string state;
};

///
/// @brief This Startup Configuration represents one startup configuration of an Process.
///
struct StartupConfiguration final
{
    const std::string GetConfigShortName() const
    {
        return config_short_name_;
    }

    const std::vector<std::string> GetExecutionDependencies() const
    {
        return execution_dependencies_;
    }
    const std::vector<FunctionalGroupState>& GetFunctionGroupStates() const
    {
        return function_group_states_;
    }
    const std::vector<std::string> GetMachineStates() const
    {
        return machine_states_;
    }
    const std::string GetResourceGroup() const
    {
        return resource_group_;
    }
    const std::string GetSchedulingPolicy() const
    {
        return scheduling_policy_;
    }
    std::uint32_t GetSchedulingPriority() const
    {
        return schedulingPriority_;
    }
    const std::vector<std::uint32_t>& GetCoreAffinityShallRunOn() const
    {
        return core_affinity_shall_run_on_;
    }
    const std::vector<std::uint32_t>& GetCoreAffinityShallNotRunOn() const
    {
        return core_affinity_shall_not_run_on_;
    }
    const EnterExitTimeout& GetEnterExitTimeout() const
    {
        return *enter_exit_timeout_;
    }

    const std::vector<std::string> GetArguments() const
    {
        return arguments_;
    }

    const std::vector<std::string> GetEnvironment() const
    {
        return environment_;
    }

    std::string config_short_name_;
    std::vector<std::string> execution_dependencies_;
    std::uint32_t execution_error_ = 1;  
    std::vector<FunctionalGroupState> function_group_states_;
    std::vector<std::string> machine_states_;
    std::string resource_group_;
    std::string scheduling_policy_;
    std::uint32_t schedulingPriority_;
    std::string termination_behavior_string_;
    std::vector<std::uint32_t> core_affinity_shall_run_on_;
    std::vector<std::uint32_t> core_affinity_shall_not_run_on_;
    nosal::core::Optional<EnterExitTimeout> enter_exit_timeout_;
    std::vector<std::string> arguments_;
    std::vector<std::string> environment_;
};

}  // namespace config
}  // namespace internal
}  // namespace exec
}  // namespace nosal
}  // namespace netaos

#endif  // NOSAL_EXEC_INTERNAL_CONFIG_STATE_DEPENDENT_STARTUP_CONFIG_H_
